home *** CD-ROM | disk | FTP | other *** search
/ System Booster / System Booster.iso / Archives / Timing / UpTime17.lha / UpTime / UpTime.doc < prev   
Encoding:
Text File  |  1994-01-11  |  10.2 KB  |  238 lines

  1. ---------------------------------------------------------------------------
  2.  
  3.                                   UpTime
  4.                      $VER: UpTime.doc 1.7 (11.01.94)
  5.  
  6. ---------------------------------------------------------------------------
  7.  
  8. The files in this archive were written by Jürgen Matern and are freely
  9. distributable as long as the archive remains intact, and only a nominal fee
  10. is charged for its distribution.
  11.  
  12. Files in archive 'UpTime17.lha':
  13.  
  14.       UpTime.info
  15.       UpTime/Install_UpTime          Version: 1.6 (19.10.93)
  16.       UpTime/Install_UpTime.info
  17.       UpTime/UpTime.doc              Version: 1.7 (11.01.94)
  18.       UpTime/UpTime.doc.info
  19.       UpTime/install/AddSlash        Version: 1.0 (23.09.93)
  20.       UpTime/install/CheckDir        Version: 1.0 (23.09.93)
  21.       UpTime/install/ExtractYear     Version: 1.0 (20.09.93)
  22.       UpTime/install/UpTime.txt
  23.       UpTime/s/CronTab
  24.       UpTime/s/CronTab.part1
  25.       UpTime/s/CronTab.part2
  26.       UpTime/s/CronTab.part3
  27.       UpTime/scripts/AtMidNite       Version: 1.0 (23.09.93)
  28.       UpTime/scripts/CheckBootDate   Version: 1.1 (09.01.94)
  29.       UpTime/scripts/CutArg          Version: 1.0 (20.09.93)
  30.       UpTime/scripts/IncreaseUpTime  Version: 1.0 (23.09.93)
  31.       UpTime/scripts/NewFileNames    Version: 1.1 (09.01.94)
  32.       UpTime/scripts/OnOff           Version: 1.1 (09.01.94)
  33.       UpTime/scripts/SayUpTime       Version: 1.0 (23.09.93)
  34.        20 files
  35.  
  36. This software is provided "AS IS" without warranty of any kind, either
  37. expressed or implied. By using it, you agree to accept the entire risk as
  38. to the quality and performance of the programs.
  39.  
  40. This software is GIFTWARE! If you like it, I would appreciate your sending
  41. me a postcard from where you live!
  42.  
  43. Comments, suggestions and bug reports are welcome.
  44.  
  45.    Jürgen Matern
  46.    Herrlingen
  47.    Max-Wieland-Straße 13
  48.    89134 Blaustein
  49.    GERMANY
  50.  
  51. Internet: s_matern@rzmain.rz.uni-ulm.de
  52.  
  53. Overview
  54. --------
  55. If you ever wanted to know, how long your computer is workig every day and
  56. you didn't know how to get this information, then this package is the
  57. solution of your problem. Once this package is installed you get three
  58. files, which are updated every day. In the first file you will find the
  59. time, your computer worked (listed day by day), in the second file you will
  60. find a note, every time your computer booted and in the third you can see,
  61. when you turned your system on, when you turned it off, and how many resets
  62. you had.
  63.  
  64. Here three little sample-logfiles:
  65.  
  66. The UpTime-file:
  67.    ...
  68.    Montag 20-Sep-93 SystemUpTime: 4 h 40 min.
  69.    Dienstag 21-Sep-93 SystemUpTime: 10 h 45 min.
  70.    Mittwoch 22-Sep-93 SystemUpTime: 4 h 45 min.
  71.  
  72. The Log-file:
  73.    ...
  74.    Dienstag 21-Sep-93 22:28:34
  75.    Dienstag 21-Sep-93 22:29:18
  76.    Dienstag 21-Sep-93 22:38:07
  77.    Mittwoch 22-Sep-93 08:39:11
  78.    Mittwoch 22-Sep-93 17:12:27
  79.    Mittwoch 22-Sep-93 18:01:08
  80.  
  81. The OnOff-file:
  82.    ...
  83.    Turned system on:  Dienstag 21-Sep-93 22:28:34
  84.    You had 2 resets!
  85.    Turned system off: Dienstag 21-Sep-93 22:45:01
  86.  
  87.    Turned system on:  Mittwoch 22-Sep-93 08:39:11
  88.    Turned system off: Mittwoch 22-Sep-93 10:35:00
  89.  
  90.    Turned system on:  Mittwoch 22-Sep-93 17:12:27
  91.    You had 1 reset!
  92.    Turned system off: Mittwoch 22-Sep-93 19:55:00
  93.  
  94.  
  95. The scripts can also control events, you only want to run once a day (i.e.
  96. updating of a find-database or something like this). In the two scripts,
  97. which control these events (CheckBootDate and AtMidNite) there is the
  98. standard-event of my system, which is executed once every day. It's the
  99. program 'updatedb'. Remove this line, if you don't use it, and put any
  100. other 'once-day-events' at its place. See the file 'Find.lha' in the
  101. Goodies-directory for more information on 'updatedb'.
  102.  
  103. This package consists of some AmigaDOS-scripts. These scripts have to be
  104. controlled via cron (an utility, which starts a script or program at
  105. defined times). If you don't use a cron-utility yet, you will have to
  106. install a cron-utility yourself. Perhaps you try 'CyberCron' from
  107. Christopher A. Wichura. You can find it on Fish 801. For the latest
  108. version also check newer ><> and in AmiNet (path: ../aminet/os20/cli/).
  109.  
  110. The scripts also need some ENV-variables to be declared (will be defined by
  111. the installscript).
  112.  
  113. As the programs are all AmigaDOS-scripts it should be easy, to modify the
  114. scripts to fit your suits.
  115.  
  116. Requirements
  117. ------------
  118. * OS 2.04 or later (never tested with 1.3)
  119. * The install-script needs the 'Pipe:'-device to be mounted
  120. * HardDisk is not required but strongly recommended
  121. * A cron-utility (i.e. CyberCron from Fish 682)
  122.  
  123. Installation
  124. ------------
  125. The installation-procedure is done by an AmigaDOS-script, which should run
  126. correctly on every 'standard installed' system. You can open a
  127. shell-window, and start it via 'execute', or by double-clicking on its
  128. icon. The UpTime-installscript (Install_UpTime) will execute some other
  129. scripts which are located in the install-directory.
  130.  
  131. The different scripts
  132. ---------------------
  133. AddSlash: This script is executed by the UpTime-installscript. You can
  134.    start it like every other AmigaDOS-script. As argument it requires a
  135.    path. If there is no '/' or ':' at the end of the path it appends a '/'
  136.    and prints the new path to the actual shell-window. This one isn't
  137.    copied to your system.
  138.  
  139. AtMidNite: This script has to be executed by cron every midnight (only,
  140.    when computer is working at this time). It resets the UpTime to 0, and
  141.    writes the UpTime of the last day to the UpTime-file. It also checks,
  142.    whether the year changed (i.e. 1993 to 1994) and changes the filenames
  143.    of the two logfiles when necessarry (via NewFileNames). This script
  144.    needs some ENV-variables to be declared. These variables are:
  145.       - UpTime/LastBoot    has been installed by CheckBootDate
  146.       - UpTime/UpTime      has been installed by IncreaseUpTime
  147.       - UpTime/UpFileName  has been installed by UpTime-installscript
  148.    In line #47 of the script you can see my 'once-day-event', if you would
  149.    like to run some programs only once a day then add the line desired to
  150.    this script. Remove this line, if you don't use 'FIND'.
  151.  
  152. CheckBootDate: This script is called via by the user-startup in your
  153.    s:-directory. It resets the UpTime to 0, and writes the UpTime of the
  154.    last day to the UpTime-file. It also checks the newyear-flag which was
  155.    set by the OnOff-script and changes the filenames of the three logfiles
  156.    when necessarry (via NewFileNames). It also writes the date of the
  157.    actual 'booting' to the BootLogFile. This script needs some ENV-
  158.    variables to be declared. These variables are:
  159.       - UpTime/UpTime      has been installed by IncreaseUpTime
  160.       - UpTime/UpFileName  has been installed by UpTime-installscript
  161.       - UpTime/LogFileName has been installed by UpTime-installscript
  162.    In the line #52 of the script there you can see my 'once-day-event', if
  163.    you would run some program only once a day then add the desired line to
  164.    this script (before the endif-command in line #53). Remove line #52, if
  165.    you don't use 'FIND'.
  166.  
  167. CheckDir: This script is executed by the UpTime-installscript. You can
  168.    start it like every other AmigaDOS-script. As argument it requires the
  169.    name of the directory it should create. If you specify an optional
  170.    argument the user is asked, whether the directory should be created,
  171.    otherwise the directory is created without asking the user. The script
  172.    also checks for an already existing directory or an existing file of the
  173.    same name. This one isn't copied to your system.
  174.  
  175. CutArg: This script is called by the following scripts: AtMidNite,
  176.    CheckBootDate and SayUpTime. It needs three arguments and returns the
  177.    first two of them.
  178.  
  179. ExtractYear: This script is executed by the UpTime-installscript. You can
  180.    start it like every other AmigaDOS-script. As argument it requires a
  181.    date in the format of the AmigaDOS date-command. From this date the
  182.    actual year is extracted and printed to the actual shell-window. This
  183.    two characters are appended as a suffix to the BaseNames, which are
  184.    installed by the UpTime-installscript. So you will get two new files
  185.    every new year. This one isn't copied to your system.
  186.  
  187. IncreaseUpTime: This script has to be executed by cron every ten minutes
  188.    and thus the 'heart' of the whole package. It just adds 10 to the
  189.    variable UpTime/UpTime and writes out a date, which is the last moment,
  190.    the system is expected to run. If you want a more accurate UpTime of
  191.    your system, then you should call this script every 5 minutes via cron
  192.    and then change the 10 to 5 in this script.
  193.  
  194. NewFileNames: This script is called by the UpTime-installscript and builds
  195.    the new filenames. It is also called, when one of the two scripts
  196.    (CheckBootDat or AtMidNite) recognizes, that we have a new year. It
  197.    requires some ENV-variables declared:
  198.       - UpTime/UpBaseName  has been installed by the UpTime-installscript
  199.       - UpTime/LogBaseName has been installed by the UpTime-installscript
  200.       - UpTime/OnOffBaseName has been installed by the UpTime-installscript
  201.    It writes the new filenames to ENV:UpTime and ENVARC:UpTime.
  202.  
  203. OnOff: This one is called by 'CheckBootDate'. It checks, if the date, which
  204.    was written by 'IncreaseUpTime' is older than 12 minutes. If this is
  205.    true, you switched your system on, otherwise, you only reseted your
  206.    computer. If you changed the standard UpTime-intervall of 10 minutes to
  207.    another value, then you should modify this scripts. See in the script
  208.    for more information on this topic. This script also checks, whether the
  209.    year changed (i.e. 1993 to 1994) and sets the newyear-flag when
  210.    necessarry.
  211.  
  212. SayUpTime: This script has to be manually executed by the user via the cli.
  213.    It then prints out the actual UpTime of the system.
  214.  
  215. Limitations
  216. -----------
  217. As I don't want to keep the system busy with working on UpTime-scripts I
  218. only increase the UpTime every ten minutes. So the UpTime may slightly
  219. differ from the real uptime of your system.
  220.  
  221. If you install the package, the first entry of the UpTime-logfile won't be
  222. very useful, because we have no valid date yet.
  223.  
  224. Acknowledgments
  225. ---------------
  226. I would like to give my thanks to the following persons (in alphabetical
  227. order):
  228.  
  229. Gerri Körner             For some beta-testing.
  230.  
  231. Christopher A. Wichura   For writing CyberCron.
  232.  
  233. Armin Wies               For some ideas.
  234.  
  235. and all the other Amigos.
  236.  
  237. Last changed: 11. January 1994 by Jürgen Matern
  238.